Programs: Structure and Syntax

This section provides details on the syntax, structure, and use of the declarations and statements supported by the KAS-IDEClosed Kollmorgen Automation Suite - Integrated Development Environment application language.

Project Structure

Structuring the application with care is important in creating your project.

See Project Structure Guidelines in the Advanced Topics.

IEC 61131-3 Editors

The KASClosed Kollmorgen Automation Suite-IDEClosed Integrated Development Environment - An type of computer software that assists computer programmers in developing software. IDEs normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and a debugger. programmingClosed The act of performing a sequence of instructions or commands. environmentClosed Environment objects are global objects that exist before the execution of the script. Typically, they are global objects of Astrolab that can be accessed from the script. provides language dedicated editors for:

A more extensive description on each language can be found in these sections of the Technical References:

See also Program Limitations and the PLC Online Change feature.

Tips

Drag-and-Drop

The editor provides you with an ideal programming environment, including drag-and-drop features:

  • Drag a variable from Dictionary and drop it into the program to insert it
  • Drag a definition from Libraries and drop it into the program to insert its name
  • Drag a block and drop it into the program to insert it (you can even select the block from an external text file).
  • Drag a function block to the variable list to declare an instance

Auto-completion

When you type the name of a function block instance (e.g., use either as an instance or a data structure), press the point (.) after the name of the instance opens a pop-up list with the names of possible elements.

Click the relevant element and validate it with the check mark.

Autocompletion

Figure 1: Autocompletion

also see "Auto-completion of Words" on page 1

Tooltip on Variable

When you leave the mouse cursor on a variable in Editors, a tooltip is shown to give you more details on the item.

Tooltip on Variable

Figure 2: Tooltip on Variable

The header of the tooltip shows the name of the variable and its type.

Bookmarks

See Bookmarks

Select Function Blocks

All available Operators, functions and function blocks are listed in the Libraries toolbox.

  • The list of available blocks is sorted into categories.
  • The (All) category is used to see the complete list of available blocks.

Insert a Block in a Program

Select a block and drag-and-drop it to its positionClosed Position means a point in space which is described by different coordinates. Depending on the used system and transformation it can consist of a maximum of six dimensions (coordinates).This means three Cartesian coordinates in space and coordinates for the orientation. In ACS there can be even more than six coordinates. If the same position is described in different coordinate systems the values of the coordinates are different. in the Editor.


  • Drag a function block from the Libraries and drop it in the variable list (Dictionary) to declare a new instance.
    Then drag this instance from the Dictionary and drop it in the program.

Select Variables and Instances

Symbols of variables and instances are selected using the variable list in the Dictionary.

Selecting variables is available from all editors:

  • In FBD diagrams, double-click on a variable box, an FB instance name, a contact or a coil to select the associated variable.
  • In FFLD diagrams, double-click on a contact, a coil or a block input or output to select the variable.
    Double-click on the top of an FB rectangle to select an instance.
  • When the variable editor is visible in the editor window, you can drag a variable from the list and drop it in the program to insert it.

Access a Single Bit of an Integer Variable

<variable>.<Bit number> (e.g., MachineState.7)

Concept Link IconSee Also